home *** CD-ROM | disk | FTP | other *** search
- #ifndef MAIN_H
- #define MAIN_H
-
- #ifndef DOS_DOSEXTENS_H
- #include <dos/dosextens.h>
- #endif
-
- #ifndef _AMIGA_H_
- #include <Amiga.h>
- #endif
-
- #if defined(DEBUG) && !defined(_STDIO_H_)
- #include <stdio.h>
- #endif
-
- #ifndef AVL_H
- #include "AVL.h"
- #endif
-
- /************************************************************************/
-
- struct AnyNode
- {
- struct AVLNode AVLNode;
- char *Name;
- };
-
- int nodecmp (struct AVLNode *, struct AVLNode *);
- int nodecasecmp (struct AVLNode *, struct AVLNode *);
-
- struct AnyNode *CreateNode (const char *, size_t);
-
- /************************************************************************/
-
- #define INCLUDEDIR 0
- #define HYPERINCLUDEDIR 1
- #define AUTODOCDIR 2
- #define HYPERAUTODOCDIR 3
- #define DIRCOUNT 4
- #define CURRENTDIR DIRCOUNT
-
- struct Arguments
- {
- char *Dirs[DIRCOUNT];
- char *Master; /* filename of master document */
- char *XREF; /* filename of xref file */
- long FullPath;
- long *Version; /* version of amigaguide */
- long Parentheses; /* add () to nodenames as well */
- long *Width; /* characters/line */
- #ifdef DEBUG
- char *Debug;
- #endif
- };
-
- /************************************************************************/
-
- extern struct DosLibrary *DOSBase;
-
- extern struct Arguments Arguments;
-
- extern int Pass2;
-
- extern BPTR Dirs[DIRCOUNT + 1];
-
- #ifdef DEBUG
- extern FILE *DebugFile;
- #endif
-
- /************************************************************************/
-
- void *xmalloc(size_t);
- void *xrealloc (void *, size_t);
- char *xstrdup (const char *);
-
- void SetRC (int);
-
- void CloseAll(int) NORETURN;
-
- #if defined(__GNUC__) && defined(__OPTIMIZE__)
- /************************************************************************/
- /* */
- /* Search an AnyNode */
- /* */
- /************************************************************************/
-
- extern INLINE struct AnyNode *
- SearchNode (struct AVLTree *Tree, char *Name)
-
- {
- struct AnyNode AnyNode;
-
- AnyNode.Name = Name;
- return (struct AnyNode *) AVL_SearchNode (Tree, &AnyNode.AVLNode);
- }
- #else
- struct AnyNode *SearchNode (struct AVLTree *, char *);
- #endif
-
- #endif /* MAIN_H */
-